package com.yy.base.page;

import java.util.List;

@SuppressWarnings("unchecked")
public class Page {
	private int pageIndex = 1;//当前页码
	private int pageSize = 20;//页面大小
	private long total;//总数据量
	private List rows;
	
	/**
	 * 当前页码
	 */
	public int getPageIndex() {
		return pageIndex;
	}
	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}
	/**
	 * 页面大小
	 */
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	/**
	 * 总总数据量
	 */
	public long getTotal() {
		return total;
	}
	public void setTotal(long total) {
		this.total = total;
	}
	/**
	 * 总页面
	 */
	public int getCountPage() {
		return (int)Math.ceil((double)total / (float)pageSize);
	}
	public List getRows() {
		return rows;
	}
	public void setRows(List rows) {
		this.rows = rows;
	}
}